from django.contrib import admin
from backend.models import User, Category, Message

# Register your models here.
# Customize models admin

class UserAdmin(admin.ModelAdmin):
    list_display = (
        'username',
        'nickname',
        'passkey'
    )

class CategoryAdmin(admin.ModelAdmin):
    list_display = (
        'description',
    )

class MessageAdmin(admin.ModelAdmin):
    list_display = (
        'user',
        'category',
        'content',
        'time',
        'latitude',
        'longitude',
    )
    list_filter = ['time']


# Registering models
admin.site.register(User, UserAdmin)
admin.site.register(Category, CategoryAdmin)
admin.site.register(Message, MessageAdmin)
